package com.kexio.enterprise.governance.retry.result;

import java.time.LocalDateTime;

/**
 * 重试尝试记录
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class RetryAttempt {
    private int attemptNumber;
    private boolean success;
    private long executionTime;
    private Throwable exception;
    private long waitTime;
    private LocalDateTime timestamp;

    public RetryAttempt(int attemptNumber) {
        this.attemptNumber = attemptNumber;
        this.timestamp = LocalDateTime.now();
    }

    // Getters and Setters
    public int getAttemptNumber() { return attemptNumber; }
    public void setAttemptNumber(int attemptNumber) { this.attemptNumber = attemptNumber; }
    
    public boolean isSuccess() { return success; }
    public void setSuccess(boolean success) { this.success = success; }
    
    public long getExecutionTime() { return executionTime; }
    public void setExecutionTime(long executionTime) { this.executionTime = executionTime; }
    
    public Throwable getException() { return exception; }
    public void setException(Throwable exception) { this.exception = exception; }
    
    public long getWaitTime() { return waitTime; }
    public void setWaitTime(long waitTime) { this.waitTime = waitTime; }
    
    public LocalDateTime getTimestamp() { return timestamp; }
    public void setTimestamp(LocalDateTime timestamp) { this.timestamp = timestamp; }
}
